package cate.common.table.pvp.arena.robot_storage;

import cate.common.table.EExcelNoteField;
import cate.common.table.EExcelRowClass;
import cate.common.table.ERow;

@EExcelRowClass(note = "跨服擂台赛-跨服擂台赛机器人库")
public class ArenaRobotStorageRow extends ERow {
    @EExcelNoteField(fieldName = "队伍1战斗实例")
    public String insCode1;
    @EExcelNoteField(fieldName = "队伍1战力")
    public long power1;
    @EExcelNoteField(fieldName = "队伍2战斗实例")
    public String insCode2;
    @EExcelNoteField(fieldName = "队伍2战力")
    public long power2;
    @EExcelNoteField(fieldName = "队伍3战斗实例")
    public String insCode3;
    @EExcelNoteField(fieldName = "队伍3战力")
    public long power3;
    @EExcelNoteField(fieldName = "总战力")
    public long totalPower;
    @EExcelNoteField(fieldName = "初始积分")
    public int initScore;

    /**
     * 获取机器人唯一ID
     */
    public String uid() {
        return "_robot" + id;
    }

    /**
     * 根据队伍序号获取机器人实例码
     *
     * @param posNum 队伍序号
     */
    public String getInsCode(int posNum) {
        switch (posNum) {
            case 1:
                return insCode1;
            case 2:
                return insCode2;
            case 3:
                return insCode3;
            default:
                return null;
        }
    }
}
